home *** CD-ROM | disk | FTP | other *** search
- // editodoc.cpp : implementation of the CEditorDoc class
- //
-
- #include "stdafx.h"
- #include "editor.h"
-
- #include "editodoc.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CEditorDoc
-
- IMPLEMENT_DYNCREATE(CEditorDoc, COleClientDoc)
-
- BEGIN_MESSAGE_MAP(CEditorDoc, COleClientDoc)
- //{{AFX_MSG_MAP(CEditorDoc)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CEditorDoc construction/destruction
-
- CEditorDoc::CEditorDoc()
- {
- // TODO: add one-time construction code here
- }
-
- CEditorDoc::~CEditorDoc()
- {
- }
-
- BOOL CEditorDoc::OnNewDocument()
- {
- if (!COleClientDoc::OnNewDocument())
- return FALSE;
- // TODO: add reinitialization code here
- // (SDI documents will reuse this document)
- return TRUE;
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CEditorDoc serialization
-
- void CEditorDoc::Serialize(CArchive& ar)
- {
- ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
- }
-
- void CEditorDoc::DeleteContents()
- {
- // TODO: add additional cleanup before doc-items are deleted
- COleClientDoc::DeleteContents(); // delete doc-items
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CEditorDoc diagnostics
-
- #ifdef _DEBUG
- void CEditorDoc::AssertValid() const
- {
- COleClientDoc::AssertValid();
- }
-
- void CEditorDoc::Dump(CDumpContext& dc) const
- {
- COleClientDoc::Dump(dc);
- }
-
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CEditorDoc commands
-